CentOS7的服务管理方式? | 您所在的位置:网站首页 › centos7搭建lamp 离线包 › CentOS7的服务管理方式? |
(1)启动服务:使用"systemctl start service_name"命令启动服务,其中"service_name"为要启动的服务名称。 (2)停止服务:使用"systemctl stop service_name"命令停止服务。 (3)重启服务:使用"systemctl restart service_name"命令重启服务。 (4)重新加载服务:使用"systemctl reload service_name"命令重新加载服务配置。 (5)查看服务状态:使用"systemctl status service_name"命令查看服务状态,包括服务是否运行、状态、进程号等信息。 (6)开机启动:使用"systemctl enable service_name"命令将指定服务加入自启动列表,使其在系统启动时自动启动。 (7)禁止开机启动:使用"systemctl disable service_name"命令将指定服务从自启动列表中删除。 (8)查询自启动服务:使用"systemctl list-unit-files --type=service"命令查询系统中已经启用或者已禁用的服务。 (9)服务日志:使用"journalctl -u service_name"命令查看指定服务的日志。 |
CopyRight 2018-2019 实验室设备网 版权所有 |